{template 'header'}
<link type="text/css" rel="stylesheet" href="../addons/bsht_tbk/res/css/uc.css">






<div id="containter" class="container">
<div class="person-top back-w">
    <div class="person-top-infor person-pad border-bottom">
        <!--a href="javascript:" class="persmess"-->
            <div class="person-head"><img src="{php echo tomedia($userinfo['avatar'])}"></div>
            <div class="person-top-text">
                <h1 style="color:#fff">&nbsp;{php echo $this->emoji($userinfo['nickname']);}</h1>
                <h2><span style="font-size:14px">{php echo intval($_W['member']['credit1']);}</span></h2>
            </div>
        <!--/a-->
            <a href="javascript:" class="bevip" onclick="bevip();" style="margin-right:20px">开通高级会员</a>
    </div>
    {if $setting['fltype']!=1}
	<div class="usertx"><span class="userpointer" style="font-size:14px;padding-left:10px">元宝：{php echo round($_W['member']['credit2'],2);}</span><span class="usergotx" style="font-size:14px;padding-right:20px" onclick="view_fee();">元宝明细</span><span class="usergotx" style="font-size:14px;padding-right:20px" onclick="ti_fee();">申请兑换元宝</span><em class="cur"></em>
	</div>
	{/if}    
        
		{if $setting['isdd']==1}
		<div class="usertopnav">
        
		
		<div class="usertopnavheader">
            <span style="font-size:14px;padding-left:10px;font-style: normal;">订单查询</span>
            <a href="#"></a>
            <div class="arrow"></div>
        </div>
        <ul>
            <li>
                    <a href="javascript:" onclick="adddingdan()">
                        <h1 class="user01"></h1>
                        <p>提交订单</p>
                    </a>
                </li>
                <!--li>
                    <a href="#">
                        <h1 class="user02"></h1>
                        <p>我的订单</p>
                    </a>
                </li-->
                <li>
                    <a href="javascript:" onclick="dd_dcl()">
                        <h1 class="user03"></h1>
                        <p>待处理</p>
                    </a>
                </li>
                <li>
                    <a href="javascript:" onclick="dd_ycl()">
                        <h1 class="user04"></h1>
                        <p>已处理</p>
                    </a>
                </li>
        </ul>
    </div>
	{/if}

</div>
</div>



<div id="search-box" style="width:100%;background-color:#fff;padding-top:10px;padding-bottom:10px">
       <form id="search-form" action="./index.php" method="get">
	        <input type="hidden" name="c" value="entry" />
			<input type="hidden" name="i" value="{$_W['uniacid']}" />
        	<input type="hidden" name="m" value="bsht_tbk" />
        	<input type="hidden" name="do" value="search" />
			{if $_GPC['cate_id']}
            <!--input type="hidden" name="cate_id" value="{$_GPC['cate_id']}" /-->
			{/if}
			{if $_GPC['keywords']}
            <!--input type="hidden" name="keywords" value="{$_GPC['keywords']}" /-->
			{/if}
        <div class="box-search">
         <input type="text" id="keywords" name="keywords" x-webkit-speech="" placeholder="搜索商品" autocomplete="off" value="{if $_GPC['keywords']}{$_GPC['keywords']}{/if}" />
         <a href="javascript:;" class="del"><img src="{$res}static/jwap/images/del.png" /></a>
        </div>
        <button id="search-submit" type="submit"><img src="{$res}static/jwap/images/search.png" /></button>
       </form>
</div>

<div class="user-box">
		  
		  <!--ul class="action-list user-show" style="text-align: center;">
            <li>
            
              <img src="{php echo tomedia($userinfo['avatar'])}" class="profile" style="width:60px;height:60px;">
              <span>&nbsp;{php echo $this->emoji($userinfo['nickname']);}</a></span>
            </li>
			
          </ul-->
          <ul class="action-list">
			
           {if $setting['glopenid']==$openid}
			<li>
              <a href="{php echo $this->createMobileUrl('admin');}">
                <em class="icon icon-address"></em>
                <span>远程控制</span>
				<em class="cur"></em>
              </a>
            </li>
			{/if}
            

            <li>
              <a href="javascript:" onclick="ph_py()">
                <em class="icon icon-yaoq"></em>
                <span>我的好友</span>
                <em class="cur"></em>
              </a>
            </li>

			{if $setting['qiandaourl']!='内置'}
			<li>
              <a href="{$setting['qiandaourl']}">
                <em class="icon icon-address"></em>
                <span>每日签到</span>
                <em class="cur"></em>
              </a>
            </li>
			{else}
			<li>
              <a href="javascript:" onclick="nbqdtip();">
                <em class="icon icon-address"></em>
                <span>每日签到</span>
                <em class="cur"></em>
              </a>
            </li>
			{/if}

            {if $setting['isshow']==1}
            <li>
              <a href="{php echo $this->createMobileUrl('show_dan', array('op' => 'add'))}">
                <em class="icon icon-temai"></em>
                <span>有奖晒单</span>
                <em class="cur"></em>
              </a>
            </li>
			{/if}
            


            {if $setting['isdtk']==2}
            <li>
              <a href="{php echo $this->createMobileUrl('fav')}">
                <em class="icon icon-bag"></em>
                <span>我的收藏</span>
                <em class="cur"></em>
                <span class="rest"></span>
              </a>
            </li>
			{/if}
            <li>
              <a href="{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=mc&a=bond&do=credits&credittype=credit1&type=record&period=1">
                <em class="icon icon-quan"></em>
                <span>积分明细</span>
                <em class="cur"></em>
              </a>
            </li>
			{if $setting['fltype']==2}
			<!--li>
              <a href="{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=mc&a=bond&do=credits&credittype=credit2&type=record&period=1">
                <em class="icon icon-quan"></em>
                <span>元宝明细</span>
                <em class="cur"></em>
              </a>
            </li-->
			{/if}
          </ul>
          
          <ul class="action-list">
            <li>
             
			 {if $setting['duihuantype']==1 || empty($setting['duihuantype'])}
              <a href="{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=activity&a=coupon">
			 {/if}

			 {if $setting['duihuantype']==2}
              <a href="{php echo $this->createMobileUrl('duiba')}">
			 {/if}

			 {if $setting['duihuantype']==3}
              <a href="{$setting['duihuanurl']}">
			 {/if}



                <em class="icon icon-help"></em>
                <span>积分兑换（总量：{php echo intval($_W['member']['credit1']);}）</span>
                <em class="cur"></em>
              </a>
            </li>
          </ul>
        </div>


{if $follow!=1}
<script>
layer.open({
	
	title:'- 管理个人中心，请先长按下图 -',
    content: '<center><div style="width:100%;"><br><img src="{$_W['account']['qrcode']}" width="100%"><br><font color="red">本功能仅限会员使用</font></div></center>',
    btn: ['返回首页'],
    shadeClose: false,
	closeBtn: false,
    yes: function(){
       window.location.href='{php echo $this->createMobileUrl('index', array('op' => 'new'))}';	
    }
});

$('.layui-layer-dialog').css('top','50px');
</script>
{/if}
<script>
function nbqdtip()
{
layer.msg('请点击公众号底部菜单签到', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 


}
</script>


<script type="text/javascript">

var auopenid = "{$openid}";

function view_fee(){
window.location.href='{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=mc&a=bond&do=credits&credittype=credit2&type=record&period=1';
}

function ti_fee(){
var minifee = {$setting['ti_minifee']};
var userfee = {php echo round($_W['member']['credit2'],2);};
if(userfee<minifee){

layer.msg('对不起，至少'+minifee+'个元宝才可兑换！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 

}

}


function bevip(){
layer.msg('对不起，暂未开启该功能！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 
}

function view_mc1(){
layer.open({
  type: 2,
  title: false,
  shadeClose: true,
  shade: 0.8,
  area: ['90%', '90%'],
  content: "{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=mc&a=bond&do=credits&credittype=credit1&type=record&period=1"
});  
}

function view_mc2(){
layer.open({
  type: 2,
  title: false,
  shadeClose: true,
  shade: 0.8,
  area: ['90%', '90%'],
  content: "{$_W['siteroot']}app/index.php?i={$_W['uniacid']}&c=mc&a=bond&do=credits&credittype=credit2&type=record&period=1"
});  
}


function dd_dcl(){
layer.open({
  type: 2,
  title: false,
  shadeClose: true,
  shade: 0.8,
  area: ['90%', '90%'],
  content: "{php echo $this->createMobileUrl('uc_dd_dcl');}&openid="+auopenid
}); 
}

function dd_ycl(){
layer.open({
  type: 2,
  title: false,
  shadeClose: true,
  shade: 0.8,
  area: ['90%', '90%'],
  content: "{php echo $this->createMobileUrl('uc_dd_ycl');}&openid="+auopenid
}); 
}

function ph_py(){
layer.open({
  type: 2,
  title: false,
  shadeClose: true,
  shade: 0.8,
  area: ['90%', '90%'],
  content: "{php echo $this->createMobileUrl('uc_ph_py');}&openid="+auopenid
}); 
}




function adddingdan(){
	
	layer.open({
			type: 1,
			title:false,
			shade:0.7,
			style: 'postion:fixed;width:80%; height:auto; padding:20px 20px; border:none;',
			content: '<div class="get-youhui">' +
			'<form id="ddform">'+
			'<p>请正确输入您的16位订单号</p>' +
			'<div class="get-youhui-inpB inp-name">' +
			'<input type="text" id="orderid" name="orderid" placeholder="请输入您的订单号" value="">'+
			'</div>'+
			'<div class="submitB">' +
			'<input type="hidden" name="openid" value="{$_W['openid']}"><button onclick="ddsumit();" type="button" class="btnn">提交订单</button>'+
						'<br></div>'+
			'</form>'+
			'</div>'
		});
	
}

var re = /^\d{16}$/;
function ddsumit(){
var orderid = $('#orderid').val();
		if(!orderid){
layer.msg('订单号不能为空！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 			return false;
		};

if(!re.test(orderid)){
layer.msg('订单号不正确！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 
			return false;
		};

$.post('{php echo $this->createMobileUrl('uc_dd',array('op'=>'add'));}',$('#ddform').serialize(),function(data){
			data = eval('('+data+')');

if(data.status==0){
layer.msg('请勿重复提交！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
  end: function(){ 
layer.closeAll();
  } 
});
return false;
		  }else if(data.status == 1){
layer.msg('提交成功', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
  end: function(){ 
layer.closeAll();
  } 
}); 
				return false;
			}else if (data.status== 500){
layer.msg('提交失败，请重试！', {
  shadeClose:true,
  closeBtn:0,
  shade:0.7,
  //skin: 'tipsclass',
}); 
				return false;
			}




});

}


</script>
{template 'footer'}